from qiniu import Auth
from config import AK,SK,BUCT_NAME
from tools.data_tools import ret_route

def get_qiniu_token():
    ak = AK
    sk = SK
    buct_name = BUCT_NAME
    q = Auth(secret_key=sk,access_key=ak)
    token = q.upload_token(bucket=buct_name,expires=3600 * 24)
    return ret_route(200,token)
